package com.dengqi.mymodule.activity.network.module;

import com.dengqi.mymodule.activity.network.bean.CardBean;
import com.dengqi.mymodule.activity.network.bean.CardImgs_Data;
import com.dengqi.mymodule.activity.network.bean.MyCardBean;
import com.dengqi.mymodule.activity.network.bean.ServiceBean;
import com.dengqi.mymodule.activity.network.bean.SpecsBean;
import com.dengqi.mymodule.activity.network.bean.SubServer_Specs;
import com.dengqi.mymodule.activity.network.bean.TotalNum_Lists;
import com.module.retrofit.bean.ResponseBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.QueryMap;

/**
 * @Author: dengqi
 * @CreateDate: 2020-10-15 20:06
 * @Description: 各种卡模块：获取 单项目/套餐/综合卡/限时卡/限次卡/限时限次卡
 */
public interface CardContract {

    interface CardView{
        String getShopId();
        String getStatus_();
        String getCardType();
        void onCardList(List<CardBean> result);
        void onServiceList(List<ServiceBean> result);
    }

    interface MyCardView{
        String getUid();
        String getShopId();
        String getCardType();
        String getCardStatus();
        void onMyCardList(List<MyCardBean> result);
    }

    interface SpecsView{
        String getShopId();
        String getSingleId();
        void onSpecsListBySingleId(List<SpecsBean> result);
    }

    interface Presenter{
        void getCardList(CardView view);
        void getMyCardList(MyCardView view);
        void getSpecsListBySingleId(SpecsView view);
    }

    interface Model{
        //单项目列表
        @GET("https://api.900sui.cn/v1/cards/single/shopSinglePage")
        Observable<ResponseBean<TotalNum_Lists<ServiceBean>>> getShopSinglePage(@QueryMap Map<String, String> fields);

        //根据singId获取规格服务
        @GET("https://api.900sui.cn/v1/cards/single/getSubServerBySingleId")
        Observable<ResponseBean<SubServer_Specs<SpecsBean>>> getSpecsBySingleId(@QueryMap Map<String, String> fields);

        //套餐列表
        @GET("https://api.900sui.cn/v1/cards/sm/shopSmPage")
        Observable<ResponseBean<TotalNum_Lists<CardBean>>> getShopSmPage(@QueryMap Map<String, String> fields);

        //综合卡列表
        @GET("https://api.900sui.cn/v1/cards/card/shopCardPage")
        Observable<ResponseBean<TotalNum_Lists<CardBean>>> getShopCardPage(@QueryMap Map<String, String> fields);

        //限时卡列表
        @GET("https://api.900sui.cn/v1/cards/hcards/shopHcardPage")
        Observable<ResponseBean<TotalNum_Lists<CardBean>>> getShopHcardPage(@QueryMap Map<String, String> fields);

        //限次卡列表
        @GET("https://api.900sui.cn/v1/cards/ncard/shopNCardPage")
        Observable<ResponseBean<TotalNum_Lists<CardBean>>> getShopNCardPage(@QueryMap Map<String, String> fields);

        //限时限次卡列表
        @GET("https://api.900sui.cn/v1/cards/hncard/shopHNCardPage")
        Observable<ResponseBean<TotalNum_Lists<CardBean>>> getShopHNCardPage(@QueryMap Map<String, String> fields);

        //用户的各种卡列表
        @GET("https://api.900sui.cn/v1/order/buscard/getUserBusCardPackage")
        Observable<ResponseBean<CardImgs_Data<TotalNum_Lists<MyCardBean>>>> getMyCardPage(@QueryMap Map<String, String> fields);


    }
}